package io.github.talelin.latticy.service.feign;

import io.github.talelin.latticy.bo.InboundOrderDetailsVo;
import io.github.talelin.latticy.bo.InboundOrderPageVo;
import io.github.talelin.latticy.dto.feign.InboundOrderOpenFeignDTO;
import io.github.talelin.latticy.dto.feign.InboundOrderPageDTO;
import io.github.talelin.latticy.dto.putaway.PutAwayDTO;
import io.github.talelin.latticy.dto.receving.ReceivingRecordDTO;
import io.github.talelin.latticy.vo.PageResponseVO;
import io.github.talelin.latticy.vo.ReceivingRecordVO;
import io.github.talelin.latticy.vo.UpdatedVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * <p>
 * 入库单表 服务类
 * </p>
 *
 * @author generator@mrxiao
 * @since 2022-05-16
 */
@FeignClient(value = "oms-server")
public interface InboundOrderFeignService {


    @GetMapping("/v1/inboundOrder/receiving/{inboundOrderNo}")
    InboundOrderDetailsVo getInboundOrderInfo(@PathVariable(value = "inboundOrderNo") String inboundOrderNo);


    @PostMapping("/v1/inboundOrder/receiving")
    UpdatedVO inboundOrderReceiving(ReceivingRecordDTO dto);

    @PostMapping("/v1/inboundOrder/putAway")
    UpdatedVO inboundOrderPutAway(InboundOrderOpenFeignDTO dto);

    @GetMapping("/v1/inboundOrder/page")
    PageResponseVO<InboundOrderPageVo> page(@SpringQueryMap InboundOrderPageDTO dto);

    /**
     * 参数默认是@RequestBody标注的，这里的@RequestBody可以不填
     * 方法名称任意
     * OMS用户注册
     */
    @PostMapping("/v1/inboundOrder/redo")
    boolean redo(@RequestBody List<ReceivingRecordVO> receivingRecordVOS);

}
